from langchain_core.prompts import ChatPromptTemplate

chat_template = ChatPromptTemplate.from_messages(
    [
        ("system", "你是一个good的AI,你的名字叫{name}"),
        ("human", "你好"),
        ("ai", "我很好，谢谢"),
        ("human","{user_input}")
    ]
)
messages = chat_template.format_messages(name="Bob",user_input="你叫什么名字")
print("\n")
print(messages)
